<%--                                                                       --%>
<%-- Copyright (c) 2004-2005 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean-el" %>

<script language="JavaScript">

  function doOneUserTemplateEditAction(myform) {
    myform.action = "<c:url value="/ep/userTemplateDetailsEdit.do"/>";
    myform.submit();
  }

  function doUserTemplateDeleteAction(myform) {
    if (!confirm('<bean-el:message key="ep.user.template.confirm.delete" bundle="ep.messages"/>')) return;
    myform.goBackAction.value = '/ep/userTemplateList.do';
    myform.action = "<c:url value="/ep/userTemplateDelete.do"/>";
    myform.submit();
  }

</script>

<html-el:form action="/ep/userTemplateDetailsView.do">
<input type="hidden" name="userTemplateId" value="<c:out value='${param.userTemplateId}'/>"/>
<input type="hidden" name="goBackAction"/>
<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
  <tr>
    <td valign="top" width="100%">
      <div class="pageTitle">


      		<c:choose>
	  			<c:when test="${userTemplateDetailsView.map.name == 'Guest'}">
	  					<bean-el:message key="ep.user.template.view.page.titleGuest" bundle="ep.messages"/>
	  			</c:when>

	  			<c:otherwise>
        <bean-el:message key="ep.user.template.view.page.title" arg0="${userTemplateDetailsView.map.name}" bundle="ep.messages"/>
	  			</c:otherwise>
		</c:choose>

      </div>
      <div class="errorMessage"><html-el:errors bundle="ep.messages"/></div>
      <%@ include file="/mc/common/pagetab.jsp" %>
      <div class="pageSubtitle">
        <span class="left">
          <bean-el:message key="ep.user.template.information" bundle="ep.messages"/>
        </span>
        <span class="right">
          <input type="button" class="inputButton" value='<bean-el:message key="button.edit" bundle="ep.messages"/>'
            onclick="doOneUserTemplateEditAction(this.form);">
          <c:if test="${userTemplateDetailsView.map.numberOfUsers==0}">
            <input type="button" class="inputButton" value='<bean-el:message key="button.delete" bundle="ep.messages"/>'
              onclick="doUserTemplateDeleteAction(this.form);">
          </c:if>
        </span>
      </div> 
      <table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="0" summary="<bean-el:message key='ep.page.types' bundle="ep.messages"/>">
        <tr> 
          <td class="label" width="30%">
            <bean-el:message key="ep.user.template.name" bundle="ep.messages"/>:
          </td>
          <td class="labelField" width="70%">


 			<c:choose>
 				<c:when test="${userTemplateDetailsView.map.name == 'Guest'}">
 							<bean-el:message key="ep.user.template.guest" bundle="ep.messages"/>
 				</c:when>

 				<c:otherwise>
            <c:out value="${userTemplateDetailsView.map.name}"/>
 				</c:otherwise>
			</c:choose>

          </td>
        </tr>
        <tr> 
          <td class="label" width="30%">
            <bean-el:message key="ep.user.template.description" bundle="ep.messages"/>:
          </td>
          <td class="labelField" width="70%">
            <c:out value="${userTemplateDetailsView.map.description}"/>
          </td>
        </tr>
        <tr> 
          <td class="label" width="30%">
            <bean-el:message key="ep.status" bundle="ep.messages"/>:
          </td>
          <td class="labelField" width="70%">
<c:choose>
  <c:when test="${userTemplateDetailsView.map.status == false}">
            <bean-el:message key="ep.status.offline" bundle="ep.messages"/>
  </c:when>
  <c:otherwise>
            <bean-el:message key="ep.status.online" bundle="ep.messages"/>
  </c:otherwise>
</c:choose> 
          </td>
        </tr>
        <tr> 
          <td class="label" width="30%">
            <bean-el:message key="ep.user.template.personal.profile.script" bundle="ep.messages"/>:
          </td>
          <td class="labelField" width="70%">
            <c:out value="${userTemplateDetailsView.map.personalProfilePagePath}"/>
          </td>
        </tr>
        <tr> 
          <td class="label" width="30%">
            <bean-el:message key="ep.user.template.feedback.email.address" bundle="ep.messages"/>:
          </td>
          <td class="labelField" width="70%">
            <c:out value="${userTemplateDetailsView.map.feedbackEmailAddress}"/>
          </td>
        </tr>
                <tr> 
          <td class="label" width="30%">
            <bean-el:message key="ep.user.template.details.customization.rules" bundle="ep.messages"/>:
          </td>
          <td class="labelField" width="70%">
            <html-el:checkbox name="userTemplateDetailsView" property="changeColorEnabled" disabled="true">
               <bean-el:message key="ep.user.template.details.allow.to.change.color" bundle="ep.messages"/>
            </html-el:checkbox>                            
          </td>
        </tr>
        <tr> 
          <td class="label" width="30%">
            &nbsp;
          </td>
          <td class="labelField" width="70%">
            <html-el:checkbox name="userTemplateDetailsView" property="homePageEnabled" disabled="true">
               <bean-el:message key="ep.user.template.details.allow.to.change.homepage" bundle="ep.messages"/>
            </html-el:checkbox>           
          </td>
        </tr>
                <tr> 
          <td class="label" width="30%">
            &nbsp;
          </td>
          <td class="labelField" width="70%">
            <html-el:checkbox name="userTemplateDetailsView" property="specifyMaxNumberOfTabs" disabled="true">
               <bean-el:message key="ep.user.template.details.specify.max.number.of.tabs" bundle="ep.messages"/>
            </html-el:checkbox>
<c:if test="${userTemplateDetailsView.map.specifyMaxNumberOfTabs == true}">
            &nbsp;&nbsp;
            <bean-el:message key="ep.user.template.details.max.number.of.tabs" bundle="ep.messages"/>:
            <c:out value="${userTemplateDetailsView.map.maxPageNumber}"/>
</c:if>
          </td>
        </tr>
      </table>
    </td> 
  </tr>
</table>
</html-el:form> 
